<?php include ADMIN_COMMON_PATH.'/header.html';?>
<div class="layui-container fly-marginTop fly-user-main">
    <?php include ADMIN_COMMON_PATH.'/setting-nav.html';?>
    <div class="fly-panel fly-panel-user" pad20>
        <div class="layui-tab layui-tab-brief" lay-filter="email">
            <ul class="layui-tab-title" id="LAY_mine">
                <li class="" lay-id="info"><a href="/<?php echo ADMIN_DIR;?>/payment">支付设置</a></li>
                <li class="layui-this" lay-id="info">编辑</li>
            </ul>
            <div class="layui-tab-content" style="padding: 20px 0;">
                <div class="layui-form-pane layui-tab-item layui-show">
                    <blockquote class="layui-elem-quote">
                        <p> 注意事项： </p>
                        <p> 本支付接口同步支付回调地址(第一种):<?php echo $config['weburl'];?>/product/query/?zlkbmethod=auto&paymethod=<?php echo $item['alias'];?>&orderid={订单号}</p>
						<p> 本支付接口同步支付回调地址(第二种):<?php echo $config['weburl'];?>/query/auto/{订单号}.html</p>
						<p> 本支付接口异步支付回调地址:<?php echo $config['weburl'];?>/product/notify/?paymethod=<?php echo $item['alias'];?></p>
						<p> 本接口对应微信支付产品为:Native支付</p>
                    </blockquote>
                    <form class="layui-form layui-show" method="post">
                        <div class="layui-form-item">
                            <label for="t_payment" class="layui-form-label">支付渠道</label>
                            <div class="layui-input-inline">
                                <input type="text" id="t_payment" name="payment" readonly disabled lay-verify="required" autocomplete="off" value="<?php echo $item['payment'];?>" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label for="payname" class="layui-form-label">显示名称</label>
                            <div class="layui-input-inline">
                                <input type="text" id="payname" name="payname" lay-verify="required" autocomplete="off" value="<?php echo $item['payname'];?>" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label for="app_id" class="layui-form-label">公众账号ID</label>
                            <div class="layui-input-inline">
                                <input type="text" id="app_id" name="app_id" required lay-verify="required" autocomplete="off" value="<?php echo $item['app_id'];?>" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label for="configure3" class="layui-form-label">商户ID</label>
                            <div class="layui-input-inline">
                                <input type="text" id="configure3" name="configure3" required lay-verify="required" autocomplete="off" value="<?php echo $item['configure3'];?>" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label for="app_secret" class="layui-form-label">密钥</label>
                            <div class="layui-input-inline">
                                <input type="text" id="app_secret" name="app_secret" required lay-verify="required" autocomplete="off" value="<?php echo $item['app_secret'];?>" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label for="app_cert_pem" class="layui-form-label">app_cert_pem</label>
                            <div class="layui-input-block">
                                <input type="text" disabled readonly value="<?php echo LIB_PATH.'Pay/'.$item['alias'].'/pem/weixin_app_cert.pem';?>" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label for="app_key_pem" class="layui-form-label">app_key_pem</label>
                            <div class="layui-input-block">
                                <input type="text" disabled readonly value="<?php echo LIB_PATH.'Pay/'.$item['alias'].'/pem/weixin_app_key.pem';?>" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">签名方式</label>
                            <div class="layui-input-inline">
                                <select name="sign_type" lay-filter="required">
                                    <option value=""></option>
                                    <option value="MD5" <?php if($item['sign_type']=='MD5' ):?>selected=""<?php endif;?>>MD5</option>
                                    <option value="HMAC-SHA256" <?php if($item['sign_type']=='HMAC-SHA256' ):?>selected=""<?php endif;?>>HMAC-SHA256</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">是否激活</label>
                            <div class="layui-input-inline">
                                <input type="radio" name="active" value="1" title="激活" <?php if($item['active']=='1' ):?>checked=""<?php endif;?>>
                                <input type="radio" name="active" value="0" title="取消" <?php if($item['active']=='0' ):?>checked=""<?php endif;?>>
                            </div>
                        </div>
						<input type="hidden" id="overtime" name="overtime" value="0">
                        <div class="layui-form-item">
                            <input type="hidden" name="id" value="<?php echo $item['id'];?>">
                            <input type="hidden" name="method" value="edit">
                            <button class="layui-btn" key="set-mine" lay-filter="edit" lay-submit>确认修改</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!--引入公共底文件-->
<?php include ADMIN_COMMON_PATH.'/footer.html';?>
<script>
layui.use('adminpayment');
</script>